
import { request } from '@/utils/request'

// 登录
export function login(data,code) {
  return request({
    url: `/login?code=${code}`,
    method: 'post',
    data
  })
}

// 登出
export function logout(data) {
  return request({
    url: '/login/out',
    method: 'post',
    data
  })
}

// 获取用户信息
export function getUserInfo() {
  return request({
    url: '/org/get',
    method: 'get'
  })
}

// 获取路由表
export function getPermissions() {
  return request({
    url: '/permissions',
    method: 'post'
  })
}

// 获取城市
export function getCityList() {
  return request({
    url: '/city',
    method: 'post'
  })
}

// 获取首页数据
export function getHomeList() {
  return request({
    url: '/home',
    method: 'post'
  })
}

// 修改密码
export function changePassword(data) {
  const { password1, password2 } = data
  return request({
    url: `/employee/update/password?password1=${password1}&password2=${password2}`,
    method: 'get'
  })
}
